import numpy as np

a = np.random.randint(-12, 12,144)
# print(a)

#形状修改
#reshape
b=a.reshape(-1,24)
print(b)
#resize
b.resize(12,12)
print(b)
#T
print(b.T)

#改变类型
print(a.dtype)
e=a.astype(np.int64)
f=a.tobytes()
print(e.dtype)
print(f)

#数组去重
h=np.unique(a)
h.resize(4,6)
print(h)